// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import {Button} from 'mint-ui'
import router from './router'
import fastClick from 'fastclick'
import store from './store'
import VueLazyload from 'vue-lazyload'

import './common/css/reset.css'
import './common/css/border.css'
import './common/iconfont/iconfont.css'
import 'lib-flexible'
import './mock/mockServer' // 加载mockServer即可
import './filters/index' // 加载时间过滤器

Vue.config.productionTip = false // 阻止启动生产消息,常用作指令。
fastClick.attach(document.body) // 移动端一秒点击延迟
Vue.component(Button.name, Button) // <mt-button> 退出按钮
Vue.use(VueLazyload, { // 图片懒加载
  error: '../static/images/error.png',
  loading: '../static/images/loading.gif'
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router, // 使用vue-router
  store, // 使用vuex
  render: h => h(App), // render函数是渲染一个视图，然后提供给el挂载，如果没有render那页面什么都不会出来
  components: { App },
  template: '<App/>'
})
